package com.praveen.twu;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by praveen on 19/6/14.
 */
public class Menu {

    List<MenuItem> items = new ArrayList<MenuItem>();

    void addItem(String item) {
        items.add(new MenuItem(item));
    }

    int getItemCount() {
        return items.size();
    }

    @Override
    public String toString() {
        String str = "";
        for (int i = 0; i < items.size(); i++) {
            str += ("\n" + (i + 1) + ". " + items.get(i));
        }
        return str;
    }
}
